#!/usr/bin/python3
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch_ros.actions import LifecycleNode
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node
from launch.actions import DeclareLaunchArgument

import lifecycle_msgs.msg
import os

def generate_launch_description():
    param_dir = os.path.join(get_package_share_directory('example_david'), 'param', 'defaults.param.yaml')
    
    example_node = LifecycleNode(package='example_david',
                                executable='example_david_talker_exe',
                                name='example_david_talker_exe',
                                output='screen',
                                emulate_tty=True,
                                parameters=[param_dir],
                                )
    return LaunchDescription([
        example_node
    ])